home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_gen / t4diblib.zip / ANIMATE1.F3_ / ANIMATE1.F3
Text File  |  1995-11-14  |  2KB  |  78 lines

  1. VERSION 2.00
  2. Begin Form Form1
  3.    Caption         =   "ANIMATE1"
  4.    ClientHeight    =   1692
  5.    ClientLeft      =   2628
  6.    ClientTop       =   2688
  7.    ClientWidth     =   2772
  8.    Height          =   2112
  9.    Left            =   2580
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1692
  12.    ScaleWidth      =   2772
  13.    Top             =   2316
  14.    Width           =   2868
  15.    Begin T4DILIB dilib1
  16.       Caption         =   "dilib1"
  17.       ControlMode     =   0  'Lib -> PIC
  18.       Height          =   372
  19.       Left            =   1680
  20.       Top             =   1200
  21.       Visible         =   0   'False
  22.       Width           =   972
  23.    End
  24.    Begin CommandButton Command1
  25.       Caption         =   "&Quit"
  26.       Height          =   372
  27.       Left            =   120
  28.       TabIndex        =   0
  29.       Top             =   1200
  30.       Width           =   1452
  31.    End
  32. End
  33. Option Explicit
  34. Declare Function GetFreeSpace& Lib "kernel" (ByVal x%)
  35. Dim TimeIn!
  36. Dim Frames%
  37.  
  38. Sub Command1_Click ()
  39.  Terminate
  40. End Sub
  41.  
  42. Sub Form_Load ()
  43. Dim loopctr%, memctr%
  44.  top = (screen.Height - Height) / 2!
  45.  left = (screen.Width - Width) / 2!
  46.  dilib1.LibraryName = "bluespin.ilb"
  47.  dilib1.Action = IM_ACTION_OPENLIBRARY
  48.  Show
  49.  Frames = 0
  50.  TimeIn = Timer
  51.  For loopctr = 1 To 100
  52.   For memctr = 1 To dilib1.MemberCount
  53. 'Load and show all DIBLIB members
  54.    dilib1.MemberNumber = memctr
  55.    dilib1.Action = IM_ACTION_GETMEMBER
  56.    Picture = dilib1.Picture
  57.    Frames = Frames + 1
  58.   Next memctr
  59.   DoEvents
  60.  Next loopctr
  61.  Terminate
  62. End Sub
  63.  
  64. Sub Form_Unload (Cancel As Integer)
  65.  End
  66. End Sub
  67.  
  68. Sub Terminate ()
  69. Dim TimeOut!, TimeElapsed!, fps!
  70.  TimeOut = Timer
  71.  TimeElapsed = TimeOut - TimeIn
  72.  fps = Frames
  73.  fps = Frames / TimeElapsed
  74.  MsgBox Trim$(Str$(fps)) + " frames per second."
  75.  End
  76. End Sub
  77.  
  78.